package cn.iocoder.yudao.framework.datasource.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * TODO
 *
 * @className: TenantConfiguration
 * @author: tangkh
 * @date: 2023-09-19 17:26
 */
@ConfigurationProperties(
        prefix = "tenant"
)
public class TenantProperties {
    private Boolean enabled;
    private List<String> ignoreTables = Arrays.asList();
    private List<String> onlyIncludes = Arrays.asList();
    private String column = "org_id";
    private List<String> ignoreSqls = new ArrayList();
    private List<String> excludes = new ArrayList();
    private List<String> orgGroupInTables = new ArrayList<>();

    public TenantProperties() {
    }

    public List<String> getOrgGroupInTables() {
        return orgGroupInTables;
    }

    public List<String> getOnlyIncludes() {
        return onlyIncludes;
    }

    public Boolean getEnabled() {
        return this.enabled;
    }

    public List<String> getIgnoreTables() {
        return this.ignoreTables;
    }

    public String getColumn() {
        return this.column;
    }

    public List<String> getIgnoreSqls() {
        return this.ignoreSqls;
    }

    public List<String> getExcludes() {
        return this.excludes;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public void setIgnoreTables(List<String> ignoreTables) {
        this.ignoreTables = ignoreTables;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public void setIgnoreSqls(List<String> ignoreSqls) {
        this.ignoreSqls = ignoreSqls;
    }

    public void setExcludes(List<String> excludes) {
        this.excludes = excludes;
    }

    protected boolean canEqual(Object other) {
        return other instanceof TenantProperties;
    }


}
